import request from '@/utils/request';

// 后台管理子系统-数智融合-智库-数智融合-智库切片 分页查询
export function pageSdkLmKbShard(params, data) {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/page',
    method: 'post',
    params,
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

// 后台管理子系统-数智融合-智库-数智融合-智库切片 查询详情
export function getSdkLmKbShardInfo(id) {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/info/' + id,
    method: 'get',
    decryptRes: true,
  });
}

// 后台管理子系统-数智融合-智库-数智融合-智库切片 新增
export function addSdkLmKbShard(data) {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/add',
    method: 'post',
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

// 后台管理子系统-数智融合-智库-数智融合-智库切片 修改
export function updateSdkLmKbShard(data) {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/edit',
    method: 'post',
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

// 后台管理子系统-数智融合-智库-数智融合-智库切片 删除
export function delSdkLmKbShard(ids) {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/delete/' + ids,
    method: 'post',
  });
}
// 后台管理子系统-数智融合-智库-数智融合-智库切片 导入模板
export function downloadSdkLmKbShard({ id, fileName }) {
  return request({
    url: `/web/lm/kb/sdkLmKbShard/download/${id}`,
    method: 'get',
    responseType: 'blob',
    filename: fileName,
  });
}
// 后台管理子系统-数智融合-智库-数智融合-智库切片 导入模板
export function tplSdkLmKbShard() {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/template',
    method: 'post',
    responseType: 'blob',
    filename: `数智融合-智库切片模版_${new Date().getTime()}.xlsx`,
  });
}

// 后台管理子系统-数智融合-智库-数智融合-智库切片 导出
export function exportSdkLmKbShard(params, data) {
  return request({
    url: '/web/lm/kb/sdkLmKbShard/export',
    method: 'post',
    params,
    data,
    responseType: 'blob',
    filename: `数智融合-智库切片_${new Date().getTime()}.xlsx`,
    hmacReq: true,
    encryptReq: true,
  });
}
